﻿using System;

namespace IOA.MES.DataAccess.VModel
{
    public class BaseVModel
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int PkId { get; set; }

        /// <summary>
        /// 是否有效
        /// </summary>
        public bool Valid { get; set; } = true;

        /// <summary>
        /// 创建人
        /// </summary>
        public int CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 最后修改时间
        /// </summary>
        public int ModifyBy { get; set; }

        /// <summary>
        /// 最后修改人
        /// </summary>
        public DateTime? ModifyTime { get; set; }

        /// <summary>
        /// 操作人
        /// </summary>
        public string CNCreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public string CreateTimeStr
        {
            get { return CreateTime.ToString("yyyy-MM-dd HH:mm:ss"); }
        }

        /// <summary>
        /// 修改人
        /// </summary>
        public string CNModifyBy { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public string ModifyTimeStr
        {
            get { return ModifyTime?.ToString("yyyy-MM-dd HH:mm:ss") ?? string.Empty; }
        }
    }
}
